package projectpackage;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

import javax.net.ssl.SSLSocket;

public class ClientServerListener extends Thread implements Runnable{
	private SSLSocket clientSocket;
	BufferedReader in;
	
	public ClientServerListener(SSLSocket clientsocket) throws IOException
	{
		this.clientSocket = clientsocket;
	}
	
	public void run() 
	{
		try {
			
			String str;
			in = new BufferedReader( new InputStreamReader(clientSocket.getInputStream() ) );
			while (!(str = in.readLine()).equals("closeclient") ) {
			  	System.out.println(str);				
			}
			
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		

	}
	
	
}
